package com.tct.worktimeboard.util;

import com.github.pagehelper.PageHelper;
import com.tct.worktimeboard.entity.PageObject;
import org.springframework.stereotype.Component;

/**
 * @program: emap
 * @description: 分页工具类
 * @author: huhailong
 * @create: 2020-06-11 09:42
 **/
@Component
public class PageUtil {
    public static void makePage(PageObject pojo){
        if(pojo.getPageNum() != null && pojo.getPageSize() != null){
            PageHelper.startPage(pojo.getPageNum(),pojo.getPageSize());
        }else{
            PageHelper.startPage(1,10);
        }
    }
}
